package com.ly.consumer.controller;


import com.common.core.domain.AjaxResult;
import com.common.redis.service.RedisService;
import com.ly.consumer.mapper.ConsumerMapper;
import com.ly.consumer.service.ConsumerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;

import java.util.*;

import static com.alibaba.fastjson.JSON.toJSONString;

@RestController
@RequestMapping("/consumerController")
public class ConsumerController {



    @Autowired
    private RedisService redisService;

    @Autowired
    private ConsumerService consumerService;

    @Autowired
    private ConsumerMapper consumerMapper;

    @Autowired




    @GetMapping("/9001")
    public String consumertes2(){

        return "开始Z";
    }

    @GetMapping("/test")
//    @PreAuthorize(hasPermi = "ss:ss:ss")
    public String test(){

        return "访问了服务9001";
    }





    @GetMapping("/mysqlbinglog")
    public String mysqlbinglog(){
        List<Map> list = new ArrayList<>();
        consumerService.insertAreaTest();
        return "新增成功";
    }

    @GetMapping("/counterLimitTest1")
    public AjaxResult counterLimitTest1(){
        System.out.println("进来了");
        return AjaxResult.success();
    }


    @GetMapping("/counterLimitTest2")
    public AjaxResult counterLimitTest2(){
        System.out.println("进来了");
        return AjaxResult.success();
    }

}
